﻿#ifndef FILEMESSAGE_H
#define FILEMESSAGE_H

#include "basemessage.h"
#include <QTextFragment>
#include <QTextDocument>

class FileMessage : public BaseMessage
{
    Q_OBJECT
public:
    FileMessage(QWidget *parent = nullptr);
    void setImage(QTextImageFormat &imageFormat);
    void setImage(const QString &filePath);
private:
    void setDefaultOption();
    QSize scaleImageSize(const QString &imagePath);
};

#endif // FILEMESSAGE_H
